package com.sumainfor.wx.system.gmio.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.wx.system.gmio.service.WaterEleGasService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Meng
 * @ClassName WaterEleGasController
 * @date 2019/8/13 13:48
 * @description: TODO 水电煤抄表
 */
@RestController
@RequestMapping("waterEleGas")
public class WaterEleGasController {

    @Autowired
    private WaterEleGasService waterEleGasService;

    /**
     * @Description //TODO 水电煤费抄表
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/13 13:51
     **/
    @PostMapping("meterReading")
    public JsonResult meterReading(@RequestBody Map<String, Object> params) {
        if (MapUtils.isEmpty(params)) {
            return JsonResult.error("参数为空");
        }
        return waterEleGasService.meterReading(params);
    }

}
